package com.jrx.anytxn.transaction.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * ClassName CouponConfig
 *
 * @author lujianyou
 * @version 1.0
 * @description 权益配置类、包含活动id等
 * @date 2021/11/4 17:26
 **/
@Component
@ConfigurationProperties(prefix = "coupon")
@Getter
@Setter
public class CouponConfig {

    public Activity activity;

    public Qualification qualification;

    public RightsAndInterests rightsAndInterests;

    /**
     * 活动参数
     */
    @Getter
    @Setter
    public static class Activity{
        /**
         * 半价过周末活动id
         */
        private String halfWeekendActivityId;
        /**
         * 统计当月1-24号消费额活动id(此为虚活动id)
         */
        private String consumptionFrom1To24ActivityId;
        /**
         * 新用户激活送120元优惠券活动id
         */
        private String newUserActiveSend120YuanActivityId;
        /**
         * 邀新用户手册消费送券活动id
         */
        private String newUserSharedConsumeFirstActivityId;

        //邀新有礼
        private String sharedFirstConsume;
        //通过默认渠道激活
        private String channelMissing;
        //通过其他渠道激活
        private Map<String,String> channels;
        //通过邀新渠道激活
        private String MGM;
        //特定渠道邀新有礼
        private Map<String,String> specificChannelsOfInviteNew;
    }

    /**
     * 权益资格参数
     */
    @Getter
    @Setter
    public static class Qualification{
        /**
         * 会员类权益资格id
         */
        private String memberId;
        /**
         * 出行类权益资格id
         */
        private String tripId;
        /**
         * 购物类权益资格id
         */
        private String shoppingId;
    }

    /**
     * 权益参数
     */
    @Getter
    @Setter
    public static class RightsAndInterests{
        /**
         * 用户送120元 12张10元优惠券id
         */
        private String tenYuanRightsId;
    }


}
